{% extends "base.html" %}
{% load static %}
{% block title %}更新{% endblock %}
{% block css %}<link rel="stylesheet" href="{% static 'css/update_novel.css' %}">{% endblock %}
{% block content %}

<div class="update-form">
    <div class="status">{{ status | default_if_none:"" }}</div>
    <h3>{{ user_data.name }}</h3>
    <form method="post" class="update-f">
        {% csrf_token %}
        <div class="update-info">
            <span class="update-key">主题</span>
            <input class="update-value" type="text" name="theme" value={{ user_data.theme }}> 
        </div>
        <div class="update-info">
            <span class="update-key">标题</span>
            <input class="update-value" type="text" name="title" value={{ user_data.title }}> 
        </div>
        <div class="update-info">
            <span class="update-key">序列</span>
            <input class="update-value" type="text" name="sort" value={{ user_data.sort | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">副标题</span>
            <input class="update-value" type="text" name="subtitle" value={{ user_data.subtitle | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">字数</span>
            <input class="update-value" type="text" id="words" name="words" value={{ user_data.words | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">章数</span>
            <input class="update-value" type="text" id="chapters" name="chapters" value={{ user_data.chapters | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">开更日期</span>
            <input class="update-value" type="text" id="date_start" name="date_start" 
            value={{ user_data.date_start | default_if_none:"" | date:"Y-m-d" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">完结日期</span>
            <input class="update-value" type="text" id="date_end" name="date_end" 
            value={{ user_data.date_end | default_if_none:"" | date:"Y-m-d" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">作者</span>
            <input class="update-value" type="text" name="author" value='{{ user_data.author | default_if_none:"" }}'> 
        </div>
    
        <input type="submit" value="提交">
</div>

<script>

</script>
    
{% endblock %}